home *** CD-ROM | disk | FTP | other *** search
/ Cream of the Crop 25 / Cream of the Crop 25.iso / os2 / srefv12i.zip / config2.cmd < prev    next >
OS/2 REXX Batch file  |  1997-04-24  |  73KB  |  1,680 lines

  1. /*3/97. this is the SRE-FILTER configuration routine */
  2. /* to add variables:
  3.    1) Create a new Param.nn line (say, Param.30='NEW_CONTROL')
  4.   2) Create a new set of output lines in the DISPLAY THEM  section
  5.   3) Create a new set of output lines in the CHANGE THEM section
  6. */
  7.  
  8. config2:
  9.  
  10. CHECKIT=0   /* Change this to 0 if you want to enable REMOTE configuration by SUPERUSERS */
  11.  
  12. USECOLOR='2dd52f'
  13.  
  14.  
  15. /* ---------------- DO NOT MODIFY BELOW THIS LINE  ------------------ */
  16.  
  17.  
  18. parse arg ddir,tempfile,sel,list,verb,uri,user,basedir,workdir,privset, ,
  19.            enmadd,transaction,verbose,servername,host_nickname,homedir
  20.  
  21. if verb="" then do
  22.    say " This SRE-Filter procedure is not meant to be run in stand-alone mode. "
  23.    say " You should invoke it using CONFIGUR.HTM ! "
  24.    exit
  25. end  /* Do */
  26.  
  27. list=translate(list, ' ', '+'||'090a0d'x)  /* Whitespace, etc. */
  28.  
  29. crlf = '0d0a'x
  30.  
  31. who2=extract('CLIENTADDR')
  32. saddr2=extract('SERVERADDR')
  33.  
  34. select
  35.    when checkit=1 then do
  36.  
  37. /* only if user = serveraddress !!! */
  38.      if who2<>saddr2 then do
  39.  
  40.         call lineout tempfile, '<!doctype html public "-//IETF//DTD HTML 3.0//EN">'
  41.         call lineout tempfile, "<html><head><title>SREFILTER ERROR </title>"
  42.         call lineout tempfile, '</head><body bgcolor="#'||usecolor||'">'
  43.  
  44.         call lineout tempfile,' <strong> Action not allowed remotely.</strong> <pre>'
  45.         call lineout tempfile,' </body> </html> '
  46.         call lineout tempfile
  47.         'FILE ERASE TYPE text/html NAME' tempfile
  48.         return 'CONFIG2: action not allowed remotely. '
  49.      end
  50.    end
  51.    otherwise do
  52.       if wordpos('SUPERUSER',privset)=0 then do
  53.  
  54.       'header add WWW-Authenticate: Basic Realm=<Configure>'  /* challenge */
  55.         call lineout tempfile, '<!doctype html public "-//IETF//DTD HTML 3.0//EN">'
  56.         call lineout tempfile, "<html><head><title>Not authorized </title>"
  57.         call lineout tempfile, '</head><body bgcolor="#'||usecolor||'">'
  58.  
  59.         call lineout tempfile,' <strong> You do not have configuration rights.</strong> <pre>'
  60.         if who2=saddr2 then 
  61.                 call lineout tempfile,'<br> <Em> You may want to edit CONFIG2.CMD </em> '
  62.         call lineout tempfile,' </body> </html> '
  63.         call lineout tempfile
  64.         return sref_response('unauth', "You do not have configuration rights ",tempfile,servername)
  65.       end
  66.    end
  67. end
  68.  
  69. /* go get initfilt */
  70. aport=extract(serverport)
  71. afile=basedir||"\INITFILT."||aport
  72.  
  73.  
  74. /* the following directories and files are subject to change */
  75. fd.1="messbox_dir"   /* location of message boxes  */
  76. fd.2="tempfile_dir"     /* workspace for server side programs */
  77. fd.3="counter_file" /* used by REPLACE HITS and REPLACE COUNTS keyphrase */
  78. fd.4="record_all_file" /* used if record_option =YES or YES_ALL */
  79. fd.5="sendfile_file"  /* used by the SENDFILE facility*/
  80. fd.6="access_file"   /* used if ALLOW_ACCESS=YES or INHOUSE*/
  81. fd.7="alias_file"   /* list of aliases */
  82. fd.8="repstrgs_file"  /* custom written variables for REPLACE keyphrase */
  83. fd.9="user_file"    /* username/password/privileges file */
  84. fd.10="upload_dir"  /* upload directory (used by GET_URL) */
  85. fd.11="upload_log"  /* log file for upload tracking */
  86. fd.12="cgi_bin_dir" /* cgi-bin directory */
  87. fd.13="virtual_file" /* file containing virtual directory information */
  88. fd.14="mailbox_dir"   /* location of incoming e-mail box */
  89. fd.15="tempdata_dir" /* workspace for srefilter */
  90. fd.16="workdata_dir" /* permanent sre-filter "data file" directory */
  91. fd.17='logon_fail_file' /* file sent if logon failure */
  92. fd.18='access_fail_file' /* file sent if sel-specific access failure */
  93.  
  94. fd.0=18
  95. do mm=1 to fd.0
  96.    fd.mm=translate(strip(fd.mm))
  97. end
  98.  
  99.  
  100.  
  101. /* IF THE VERB IS POST-- THEN THIS IS A "WRITE INFO CALL
  102.    IF IT'S GET, THEN ITS A "SHOW INFO" OR "LET ME CHANGE INFO" CALL
  103. */
  104.  
  105. if translate(verb)="POST" then signal write_it
  106.  
  107.  
  108.  
  109. /* IF HERE, VERB=GET --- so show vars or request changes  */
  110.  
  111.  
  112.  
  113. parse upper var list foo '=' todo
  114. ll=list
  115. nickname=' '
  116. do until ll=' '
  117.    parse var ll a1 '&' ll
  118.    parse var a1 a1a '=' a2a ; a2a=packur(a2a) ; a1a=packur(a1a)
  119.    if upper(a1a)='TODO' then todo=upper(a2a)
  120.    if upper(a1a)='HOST_NICKNAME' then nickname=strip(upper(a2a))
  121. end /* do */
  122.  
  123. /* read initfilt.80 file into internal storage */
  124.  
  125. FOO=fileREAD(AFILE,'FILELINES',,'E')
  126. IF FOO=0 THEN DO
  127.   SAY " CONFIG2 ERROR: COULD NOT READ INITFILT FILE "
  128.   'String  Error reading initfilt file '
  129.   return "CONFIG2 ERROR: Could Not read INITFILT FILE "
  130. end
  131.  
  132. /* convert < to < and > to > */
  133. i=0
  134. do mm=1 to filelines.0
  135.   big=fix_me(filelines.mm)
  136.   filelines.mm.igot=0           /* fill this is later */
  137.   filelines.mm.name=0           /* assume it's comment/blank */
  138.   filelines.mm.stem=' '          /* assume is non stem var */
  139.   filelines.mm.value=' '
  140.   if big  <>" " then do
  141.      big=sref_replacestrg(big,'<','<','all')
  142.      big=sref_replacestrg(big,'>','>','all') 
  143.      filelines.mm=big
  144.      if abbrev(strip(big),';')=0  then do
  145.          parse var big atype '=' avalue 
  146.          if words(atype)=1  then do
  147.              parse upper var atype aname '.' astem
  148.              filelines.mm.name=upper(strip(aname))
  149.              filelines.mm.value=strip(strip(avalue),,"'")
  150.              if astem<>' ' then filelines.mm.stem=astem
  151.              opop=filelines.mm.name
  152.              if nickname=' ' & verify(astem,'0123456789 .')>0 then do
  153.                   nop                   /* no nickname, but nickname in entry */
  154.              end
  155.              else do
  156.                 if symbol('quiklist.opop')='VAR' then do
  157.                    quiklist.opop=quiklist.opop' 'mm
  158.                 end
  159.                 else do
  160.                    quiklist.opop=mm
  161.                 end   /* quiklist */
  162.              end   /* verify/nickname */
  163.           end      /* one work name */
  164.       end       /* comment */
  165.    end          /* not ' ' line */
  166. end      /* loop over lines */
  167.  
  168. /* the following is a list of parameters that we will adjust 
  169. (if end in ., it's a stem variable)*/
  170.  
  171. /* logon control variables */
  172. param.1="checklog"  /* whether require logon: NO YES ALWAYS INHOUSE*/
  173. param.2="owners"     /* list of owners */
  174. param.3="inhouseips."  /* stem variable of inhouse ips */
  175. param.4="unallowedips." /* stem variable of unallowed ip */
  176.  
  177. /* request string modification variables */
  178. param.5="default"   /* the default page : A file name relative to ddir*/
  179. param.6="xxxyyyzzz"      /* fill in later */
  180. param.7="home_dir"    /* the ~ substitution */
  181. param.8="auto_name"  /* list of potential "default documents" for directories */
  182.  
  183. /* access and auditing variables */
  184. param.9="allow_access"   /*File specific: YES=no control, INHOUSE=inhouse only, NO=Superusrs */
  185. param.10="record_option" /*NO YES YES_ALL FILE arguments*/
  186. param.11="verbose" /*  */
  187.  
  188. /* stem variables for  REPLACE keyphrase */
  189. param.12="headers."     /* stem variable of headers */
  190. param.13="footers."    /* stem variable of footers */
  191. param.14="inhouse."    /* stem variables for replace inhouse. static variables */
  192. param.15="superuser."  /* stem variables for replace superuser. static variables*/
  193.  
  194. /* static variables for REPLACE keyphrase */
  195. param.16="webmaster"   /* string containing the webmasters url */
  196. param.17="home_name"  /* colloquial name of this server */
  197.  
  198. /* misc. static variables (used for a variety of internally generated messages  */
  199. param.18="the_realm"    /* Colloquial name of "inhouse" folks*/
  200. param.19="option_hit_line" /* variable used with option_hit.n and option_count.n */
  201. param.20="not_found_url" /* string returned with 404 error */
  202.  
  203. /* late additions */
  204. param.21="INHOUSE_PRIVS"
  205. param.22="PUBLIC_PRIVS"
  206. param.23="PUBLIC_URLS."  /* stem var of public urls */
  207. param.24="AUTO_HEADER"
  208. param.25="UPLOAD_MAXSIZE"
  209. param.26="UPLOAD_MINFREE"
  210. param.27="NOEXT_TYPE"
  211. param.28="POST_FILTER"
  212. param.29="PRE_FILTER"
  213. param.30="DNS_CHECK"
  214. param.31="SMTP_GATEWAY"
  215. param.32='SSI_SHTML_ONLY'
  216. param.33='HOSTS.'
  217. param.34='DO_HTACCESS'
  218. param.35='FIX_EXPIRE'
  219. param.36='HIT_CACHE_LEN'
  220. param.37='HIT_CACHE_DURATION'
  221. param.38='HIT_OWNER_SUPPRESS'
  222. param.39='CHECK_ADD_PRIVS'
  223. param.40='DIR_OPTIONS'
  224. param.41='DIR_EXCLUSION'
  225. param.42='SSI_CACHE_ON'
  226. param.43='WRITE_LOGS'
  227.  
  228. param.0=43
  229. do mm=1 to param.0
  230.    param.mm=strip(translate(param.mm))
  231.    param.mm.stem=0
  232.    if pos('.',param.mm)>0 then param.mm.stem=1
  233.    param.mm=strip(param.mm,,'.')
  234. end
  235.  
  236.  
  237. /* Note that a number of variables will  NOT be settable by this program.  
  238. Ambitious users can go into INITFILT.80 and edit these parameters.
  239. */
  240.  
  241.  
  242. /* ************************  DISPLAY THEM --------------------------------*/
  243. if todo="SHOW" then do
  244.    call lineout tempfile, '<!doctype html public "-//IETF//DTD HTML 3.0//EN">'
  245.    call lineout tempfile, "<html><head><title>SRE-Filter Configurator: Current Parameters</title>"
  246.    call lineout tempfile, '</head><body bgcolor="#'||usecolor||'">'
  247.  
  248.    call lineout tempfile," <hr> <h2> Current Settings of SRE-FILTER's Parameters </h2> "
  249.    if nickname<>'' then do
  250.         call lineout tempfile,' <h3> For parameters specific to the ' nickname ' host.</h3>'
  251.         call lineout tempfile,' <blockquote> You selected <strong>' nickname ' </strong> as the  target "host nickname" '
  252.         call lineout tempfile,' The top half of this document contains only parameters specific to <strong>' nickname '. </strong>'
  253.         call lineout tempfile,'<eM> Non host-specific parameters</em>, which are used when a host-specific parameter is '
  254.         call lineout tempfile,' not specified, are listed  at  '
  255.         call lineout tempfile,' the  <A HREF="#otherparams">bottom half of the document</A>. '
  256.  
  257.    end  /* Do */
  258.  
  259.    call lineout tempfile, ' <h3> Logon Control Variables </h3> <menu> '
  260.    do mm=1 to 4
  261.        foo=write_1(mm)
  262.    end
  263.    foo=write_1(30)
  264.  
  265.   call lineout tempfile,' </menu> <h3> PUBLIC_URLS </h3>  <menu>'
  266.    foo=write_1(23)
  267.  
  268.   call lineout tempfile,'  </menu> <H3> HOST Identifiers </h3>  <menu>'
  269.      foo=write_1(33,2)
  270.  
  271.   call lineout tempfile,' </menu>  <h3> Request  modification variables  </h3>  <menu>'
  272.     do mm=5 to 8
  273.         if mm=6 then iterate
  274.        foo=write_1(mm)
  275.     end
  276.     foo=write_1(27)
  277.     foo=write_1(40)
  278.     foo=write_1(41)
  279.  
  280.    call lineout tempfile,' </menu> <h3> Reponse header creation, Pre and Post filters </h3>  <menu>'
  281.    foo=write_1(24)
  282.    foo=write_1(28)
  283.    foo=write_1(29)
  284.  
  285.   call lineout tempfile,' </menu>  <h3> File access and auditing variables  </h3>  <menu>'
  286.    do mm=9 to 10
  287.        foo=write_1(mm)
  288.     end
  289.     foo=write_1(21)
  290.     foo=write_1(22)
  291.     foo=write_1(34)
  292.     foo=write_1(43)
  293.  
  294.     foo=write_1(36)
  295.     foo=write_1(37)
  296.     foo=write_1(38)
  297.     foo=write_1(39)
  298.  
  299.   call lineout tempfile,' </menu> <h3> SSI control and stem variables for REPLACE keyphrase </h3>  <menu>'
  300.    foo=write_1(32)
  301.    foo=write_1(42)
  302.    do mm=12 to 15
  303.  
  304.        foo=write_1(mm)
  305.     end
  306.  
  307.   call lineout tempfile,' </menu>  <h3> Other variables for REPLACE keyphrase  </h3>  <menu>'
  308.    do mm=16 to 17
  309.        foo=write_1(mm)
  310.     end
  311.  
  312.   call lineout tempfile, '</menu> <h3>Upload control, and E-Mail support, variables </h3>  <menu>'
  313.   do mm=25 to 26
  314.      foo=write_1(mm)
  315.   end
  316.   foo=write_1(31)
  317.  
  318.   call lineout tempfile,'</menu>  <h3> Miscellanous variables (used for error messages, etc.) </h3>  <menu>'
  319.    do mm=18 to 20
  320.        foo=write_1(mm)
  321.     end
  322.     foo=write_1(35)
  323.  
  324.   call lineout tempfile,'</menu>  <hr width=50%>   <h3> Files and Directories .. </h3> <menu> '
  325.   do mm2=1 to fd.0
  326.       foo=write_1(mm2,1)
  327.   end
  328.  CALL LINEOUT TEMPFILE,'</menu>'
  329.  
  330.  
  331.    call lineout tempfile,' <hr>  <h2><a name="otherparams"> Other  SRE-FILTER Parameters </a> </h2>  '
  332.    call lineout tempfile,' Note that the following parameters and filenames: <ol>'
  333.    call lineout tempfile,' <li> Either apply to a  different HOST.  To change them, '
  334.    call lineout tempfile,' re-run this configurator with a different HOST NICKNAME'
  335.    if nickname<>' ' then do
  336.      call lineout tempfile,' <li>Are non-host specific parameters (which may'
  337.      call lineout tempfile,' be used if there is no host-specific entry for the parameter)'
  338.    end
  339.    call lineout tempfile,' <li>Are parameters that this configurator will not modify.'
  340.  
  341.    call lineout tempfile," <em> To change them, you'll have to edit INITFILT."aport
  342.    call lineout tempfile,' </em> </ol> <br>'
  343.    call lineout tempfile, ' <blockquote> <code> <menu>'
  344.  
  345.   spuds=0
  346.    do mm=1 to filelines.0               /* write other host/ misc lines */
  347.        findit=filelines.mm.name
  348.        if findit=0 then iterate
  349.        IF FILELINES.MM.IGOT=1 then ITERATE
  350.        avalue=filelines.mm.value
  351.        dostem=filelines.mm.stem
  352.        spuds=spuds+1
  353.        tofus.spuds.afindit=findit
  354.        tofus.spuds.aavalue=avalue
  355.        tofus.spuds.adostem=dostem
  356.        tofus.spuds.jdone=0
  357.    end
  358. /* sort into "non-host specific" and "host-specific" terms */
  359.    do mu=1 to spuds             /* the non-host specific terms */
  360.        dostem=tofus.mu.adostem
  361.        findit=tofus.mu.afindit
  362.        avalue=tofus.mu.aavalue
  363.        if dostem=' ' then do
  364.           call lineout tempfile, " <li> <b>" findit "</b> =<tt> " avalue '</tt> <br>'
  365.           tofus.mu.jdone=1
  366.        end
  367.        else do
  368.           foox=lastpos('.',dostem)
  369.           yeek=substr(dostem,foox+1)
  370.           if datatype(yeek)='NUM' then do
  371.               call lineout tempfile, " <li> <b>" findit ||'.'|| dostem "</b> =<tt> " avalue '</tt> <br>'
  372.               tofus.mu.jdone=1
  373.           end
  374.        end
  375.    end /* do */
  376.    call lineout tempfile,'</menu><br><menu> '
  377.  
  378. ndid=1
  379. do until ndid=0
  380.    ndid=0
  381.  
  382.    do mu=1 to spuds
  383.        if tofus.mu.jdone=1 then iterate
  384.        ndid=ndid+1
  385.        dostem=tofus.mu.adostem
  386.        foox=lastpos('.',dostem)
  387.        yhost=substr(dostem,foox+1)
  388.        if ndid=1 then do
  389.           nowhost=yhost
  390.        end
  391.        else do
  392.            if yhost<>nowhost then iterate 
  393.        end  /* Do */
  394.        findit=tofus.mu.afindit
  395.        avalue=tofus.mu.aavalue
  396.        if dostem=' ' then do
  397.           call lineout tempfile, " <li> <b>" findit "</b> =<tt> " avalue '</tt> <br>'
  398.           tofus.mu.jdone=1
  399.        end
  400.        else do
  401.            call lineout tempfile, " <li> <b>" findit ||'.'|| dostem "</b> =<tt> " avalue '</tt> <br>'
  402.            tofus.mu.jdone=1
  403.        end
  404.    end /* do */
  405.    call lineout tempfile,'</menu><br><menu> '
  406.  
  407. end
  408. call lineout tempfile,'</menu>'
  409.  
  410.  
  411. call lineout tempfile,' </menu> '
  412. call lineout tempfile,'<p> <em> Note: REXX Comments may point to parameter-entry errors! </em>  '
  413. call lineout tempfile,' </blockquote> <hr> </body> </html> '
  414. call lineout tempfile
  415.  
  416. tt=sref_expire_response(0.05,dosdir(tempfile,'s'))
  417. 'FILE ERASE TYPE text/html NAME' tempfile
  418. return ' '
  419.  
  420. end
  421.  
  422.  
  423. /* ****************      CHANGE THEM --------------------------------. */
  424. else do                         
  425.  
  426.  
  427.  call lineout tempfile, '<!doctype html public "-//IETF//DTD HTML 3.0//EN">'
  428.   call lineout tempfile, "<html><head><title>SRE-Filter Intermediate Mode Configurator: Modify Parameters </title>"
  429.         call lineout tempfile, '</head><body bgcolor="#'||usecolor||'">'
  430.  
  431.         call lineout tempfile,' <h1> SRE-Filter Configurator: Intermediate Mode </h1>'
  432.   call lineout tempfile,'<h2>  Change parameter values </h2>'
  433.   call lineout tempfile,'This form allows you to change most (but not all) of the SRE-Filter parameters. '
  434.   call lineout tempfile,'The current values are shown, and are retained if not explicitily modified.'
  435.  
  436.   if  nickname<>' 'then do
  437.      call lineout tempfile,' <p> You selected the <strong> ' nickname '</strong> host nickname.'
  438.      call lineout tempfile,' Parameters specific to <strong> ' nickname '</strong> '
  439.      call lineout tempfile,'will be displayed (and modified). '
  440.      call lineout tempfile,'<br> <em>Note:</em> When  a <strong> ' nickname '</strong>  specific parameter is not available,'
  441.      call lineout tempfile,' the default (non host-specific) version is used.'
  442.  
  443.   end  /* Do */
  444.  
  445.   call lineout tempfile,'<p><em> If the explanations here are insufficient, '
  446.   call lineout tempfile,' <a href="/samples/initfilt.doc">INITFILT.DOC</a>'
  447.   call lineout tempfile,'might help!</em>'
  448.   call lineout tempfile,'<HR WIDTH=40%>'
  449.   call lineout tempfile,' Notes: <ul>'
  450.   if nickname<>' ' then do
  451.      call lineout tempfile,' <li> If you want to leave a field blank, <strong>we advise inserting a 0 </strong> -- since SRE-Filter will attempt '
  452.      call lineout tempfile,' to use the default (non host-specific) parameter whenever it finds an empty variable (this'
  453.      call lineout tempfile,' is a design "feature" ' " of REXX's use of the OS/2 environment)!<br>"
  454.   end
  455.   call lineout tempfile,' <li> To change the "more obscure" parameters not mentioned here you will have to'
  456.   call lineout tempfile,' edit INITFILT.'||aport ' by hand (see INITFILT.DOC for details) '
  457.   call lineout tempfile,'<li> A caution: '
  458.   call lineout tempfile," do not use <code>single quote</code> (<strong>'</strong>) characters (they will cause errors)!"
  459.   call lineout tempfile,'</ul><hr>'
  460.   call lineout tempfile,'<FORM ACTION="config2" METHOD="POST">'
  461.  
  462.   call lineout tempfile,' <em> <A NAME="section0">Quick jumps...</A> </em> <br>'
  463.  
  464.   call lineout tempfile,'  <dl> <dt> <A HREF="#section1">Logon, privileges, HOSTS, and Public URLS</A> '
  465.   call lineout tempfile,' <dd> CHECKLOG, OWNERS, INHOUSEIPS. INHOUSE_PRIV, PUBLIC_PRIVS, UNALLOWED_IPS., DNS_CHECK, HOSTS., PUBLIC_URLS.'
  466.   call lineout tempfile,' <dt><A HREF="#section2">Request modification </A>'
  467.   call lineout tempfile,' <dd> DEFAULT, HOME_DIR, NOEXT_TYPE, AUTO_NAME DIR_OPTIONS DIR_EXCLUSION '
  468.   call lineout tempfile,'<dt><A HREF="#section3"> Access and Auditing</A> '
  469.   call lineout tempfile,' <dd> ALLOW_ACCESS, DO_HTACCESS, WRITE_LOGS, RECORD_OPTION, HIT_CACHE_LEN, HIT_CACHE_DURATION, HIT_OWNER_SUPPRESS, CHECK_ADD_PRIVS '
  470.   call lineout tempfile,' <dt><A HREF="#section4">SSI control, Response Header, Pre-filter and Post-Filter, and Uploading</A> '
  471.   call lineout tempfile,' <dd> AUTO_HEADER, PRE_FILTER, POST_FILTER, SSI_SHTML_ONLY, SSI_CACHE_ON, SMTP_GATEWAY, UPLOAD_MINFREE, UPLOAD_MAXSIZE '
  472.   call lineout tempfile,' <dt><A HREF="#section5">String Replacements</A> '
  473.   call lineout tempfile,' <dd> HEADERS., FOOTERS., INHOUSE. message, SUPERUSER. message, WEBMASTER address, HOME_NAME '
  474.   call lineout tempfile,'<dt><A HREF="#section5a"> Miscellaneous</A> '
  475.   call lineout tempfile,' <dd> THE_REALM, OPTION_HIT_LINE, NOT_FOUND_URL, FIX_EXPIRE '
  476.   call lineout tempfile,'<dt><A HREF="#section6"> File & Directory Names</A> '
  477.   call lineout tempfile,'</dl> <p> <em> and when you are done.. </em> '
  478.   call lineout tempfile,'<INPUT TYPE="submit" VALUE="make the changes">, '
  479.   call lineout tempfile,' <em> or you can </em> '
  480.   call lineout tempfile,'<INPUT TYPE="reset" VALUE="reset to current values">'
  481.  
  482.  
  483.  
  484.   call lineout tempfile,' <hr width=80%> '
  485.  
  486.   call lineout tempfile,' <H3><a name="section1"> Logon, Privileges, and Public URLS </a></H3>'
  487.  
  488.   call lineout tempfile,'<dl>'
  489.  
  490.  
  491. /* CHECKLOG */
  492.  
  493.   call lineout tempfile,'<dt> <strong>CHECKLOG</strong>:'
  494.   v.1="NO" ; v.2="YES" ; v.3="ALWAYS" ; v.4="INHOUSE" ;
  495.   foo=do_radio(1,4)
  496.   call lineout tempfile,'<dd>'
  497.   call lineout tempfile,'CHECKLOG controls the logon-level:'
  498.   call lineout tempfile,'<ul>'
  499.   call lineout tempfile,'<LI>NO : Logon never required'
  500.   call lineout tempfile,'<LI>YES : Logon required for "empty" (home-page) requests'
  501.   call lineout tempfile,'<LI>ALWAYS : Logon required for any request'
  502. call lineout tempfile,'<LI>INHOUSE : Only requesters with predefined, or explicitily granted (in the'
  503. call lineout tempfile,'USERS.IN file) privileges of INHOUSE or SUPERUSER are allowed in.'
  504. call lineout tempfile,'</ul>'
  505.  
  506.  
  507. /* owners */
  508. call lineout tempfile,'<hr><dt> <strong>OWNERS</strong>:'
  509. call lineout tempfile,' <INPUT TYPE="text" NAME="OWNERS" '
  510. thisval=find_val(2,2)
  511.  
  512. call lineout tempfile,'value="' thisval '"'
  513. call lineout tempfile,' SIZE=30 MAXLENGTH=80>'
  514. call lineout tempfile,'<dd>'
  515. call lineout tempfile,'OWNERS is a space delimited list of  <strong>numeric </strong> IP addresses of the OWNERS.  Owners'
  516. call lineout tempfile,'are automatically granted SUPERUSER privileges.'
  517. call lineout tempfile,'<em>Wildcards are NOT allowed in the OWNERS list </em>'
  518.  
  519. /* INHOUSEIPS.ips */
  520. foo=find_val(3,2)
  521. call lineout tempfile,'<hr><dt> <strong>INHOUSEIPS.</strong>:'
  522. call lineout tempfile,' <TEXTAREA NAME="'||param.3||'." ROWS=4 COLS=25>'
  523. call lineout tempfile,foo
  524. call lineout tempfile,'</TEXTAREA>'
  525. call lineout tempfile,'<dd>'
  526. call lineout tempfile,' INHOUSEIPS. is a "stem" variable that contains the IP '
  527. call lineout tempfile,' addresses (numeric or name) of requesters who will be automatically granted INHOUSE privileges.'
  528. call lineout tempfile,' <br> You should enter each of these addresses on a <strong> seperate line </strong> .'
  529. call lineout tempfile,' <em> Wildcards (the * character) are allowed</em>'
  530. call lineout tempfile,' <p> In addition, you can put (optional)privileges after the '
  531. call lineout tempfile, ' the IP address. '
  532. call lineout tempfile,' <BR> Examples: <ul> <li> 152.22.12.* <li>515.21.512.51 VIEWMESS PROJ1'
  533. call lineout tempfile,' <li> pf.ourisp.org  <li>551.21.512.* </ul> '
  534. call lineout tempfile, ' <br> Note that 515.21.512.51 is granted VIEWMESS and PROJ1 privileges '
  535. call lineout tempfile, " (in addition to the INHOUSE_PRIV's privleges) "
  536.  
  537.  
  538. /*INHOUSE_PRIVS*/
  539. call lineout tempfile,'<hR><dt> <strong>INHOUSE_PRIVS</strong>:'
  540. call lineout tempfile,' <INPUT TYPE="text" NAME="INHOUSE_PRIVS" '
  541. foo=find_val(21)
  542. call lineout tempfile,'value="' foo '"'
  543. call lineout tempfile,' SIZE=30 MAXLENGTH=80>'
  544. call lineout tempfile,'<dd> INHOUSE_PRIVS is a space delimited list of  "extra"'
  545. call lineout tempfile,' privileges to give to OWNERS and to IN-HOUSE requesters.'
  546. call lineout tempfile,' <br>It is <em> highly</em> recommended that <strong>INHOUSE</strong>'
  547. call lineout tempfile,' be included in this list! <p>'
  548. call lineout tempfile,' Example: if you want to give all IN-HOUSE requesters '
  549. call lineout tempfile,' message-box reading privileges, add VIEWMESS to this list.'
  550.  
  551. /*PUBLIC_PRIVS*/
  552. call lineout tempfile,'<hR><dt> <strong>PUBLIC_PRIVS</strong>:'
  553. call lineout tempfile,' <INPUT TYPE="text" NAME="PUBLIC_PRIVS" '
  554. foo=find_val(22)
  555. call lineout tempfile,'value="' foo '"'
  556. call lineout tempfile,' SIZE=30 MAXLENGTH=80>'
  557. call lineout tempfile,'<dd> PUBLIC_PRIVS is a space delimited list of "extra" '
  558. call lineout tempfile,' privileges to give to  everyone. '
  559.  
  560.  
  561. /* Unallowed ips */
  562. foo=find_val(4,2)
  563. call lineout tempfile,'<hr><dt> <strong>UNALLOWEDIPS.</strong>:'
  564. call lineout tempfile,' <TEXTAREA NAME="'||param.4||'." ROWS=4 COLS=25>'
  565. call lineout tempfile,foo
  566. call lineout tempfile,'</TEXTAREA>'
  567. call lineout tempfile,'<dd>'
  568. call lineout tempfile,' UNALLOWEDIPS. is the "opposite" of INHOUSEIPS. It is a list of '
  569. call lineout tempfile,' the IP addresses of requesters who will NOT be allowed access.'
  570. call lineout tempfile,' Note  INHOUSEIPS. and OWNERS takes precedence over UNALLOWEDIPS.'
  571. call lineout tempfile,' Thus, entering *.*.*.* as an UNALLOWEDIPS. will keep everyone, except '
  572. call lineout tempfile,' OWNERS and INHOUSE requesters, out! '
  573.  
  574. /* DNS_CHECK */
  575.   call lineout tempfile,'<hr><dt> <strong>DNS_CHECK</strong>:'
  576.   v.1="NO" ; v.2="YES"  
  577.   foo=do_radio(30,2)
  578.   call lineout tempfile,'<dd>'
  579.   call lineout tempfile,'DNS_CHECK controls whether a domain name check should occur:'
  580.   call lineout tempfile,'<ul>'
  581.   call lineout tempfile,"<LI>NO : Do not check the user's <tt> IP Name </tt> "
  582.   call lineout tempfile,"<LI>YES : Get the user's <tt> IP Name </tt> (by calling the DNS), and deny access if not found"
  583.   call lineout tempfile,'</ul>'
  584.   call lineout tempfile,' DNS_CHECK=YES  provides extra security, but will slow response time '
  585.   call lineout tempfile, ' (and may keep out legitimate clients with faulty DNS servers).'
  586.  
  587. /* hosts */
  588. foo=""
  589. call lineout tempfile,'<hr><dt> <strong>HOSTS.</strong>:'
  590. call lineout tempfile,' <TEXTAREA NAME="'||param.33||'." ROWS=4 COLS=45>'
  591. foo=find_val(33,1)
  592. call lineout tempfile,foo
  593. call lineout tempfile,'</TEXTAREA>'
  594. call lineout tempfile,'<dd>'
  595. call lineout tempfile,'HOSTS. is a stem variable used to identify what HOSTS '
  596. call lineout tempfile,'GoServe is servicing.'
  597. call lineout tempfile,'Each HOSTS. entry should contain the following comma-delimited information:<br>'
  598. call lineout tempfile,'<code> IP_address , host_nickname , default_dir</code> <p>'
  599. call lineout tempfile,'Where <blockquote>'
  600. call lineout tempfile,'<STRONG>IP_address</STRONG> is the IP address (numeric or character) of the host. <br>'
  601. call lineout tempfile,' <STRONG>host_nickname</STRONG> is the "nickname" that you will use to refer to this host <br>'
  602. call lineout tempfile,' <STRONG>default_directory</STRONG> is the default data directory for this host </blockquote>'
  603. call lineout tempfile,' Examples:<MENU>'
  604. call lineout tempfile,'<LI>www.ag.gov , main , e:\WWW1  <br>'
  605. call lineout tempfile,'<LI>w3.ag.gov , second , e:\WWW2  <LI> 0</MENU>'
  606. if nickname<>' ' then
  607.   call lineout tempfile,'<p><strong> Reminder: the HOSTS. parameters are NOT host-specific! </strong>'
  608.  
  609. /* public urls */
  610. foo=find_val(23)
  611. call lineout tempfile,'<hr><dt> <strong>PUBLIC_URLS.</strong>:'
  612. call lineout tempfile,' <TEXTAREA NAME="'||param.23||'." ROWS=4 COLS=25>'
  613. call lineout tempfile,foo
  614. call lineout tempfile,'</TEXTAREA>'
  615. call lineout tempfile,'<dd>'
  616. call lineout tempfile,' PUBLIC_URLS. is a "stem" variable that contains a '
  617. call lineout tempfile,' list of "publically accessible URLs".  These URLs '
  618. call lineout tempfile,'will be available to all requesters -- no logon or '
  619. call lineout tempfile,'access control is attempted when PUBLIC_URLS are requested.<br>'
  620. call lineout tempfile,'PUBLIC_URLS. entry may include * (for wildcard matching). <br>'
  621. call lineout tempfile,'You can also specify <strong>LITERAL </strong> PUBLIC_URLS. <br>'
  622. call lineout tempfile,' <em> Note that PUBLIC_URLS. entries  will be checked against your ALIASES</em>'
  623.  
  624. call lineout tempfile,'</dl>  '
  625. call lineout tempfile,' <hr width=40%>  '
  626. call lineout tempfile,' <A HREF="#section0"><EM>go to top of document</EM></A> '
  627. call lineout tempfile,' <hr width=40%>  '
  628. call lineout tempfile,'  <H3><A name="section2">Request Modification </a3> </H3>'
  629. call lineout tempfile,' <dl> '
  630.  
  631. /* DEFAULT */
  632. call lineout tempfile,'<p> <dt> <strong>DEFAULT</strong>:'
  633. call lineout tempfile,' <INPUT TYPE="text" NAME="DEFAULT" '
  634. foo=find_val(5)
  635. call lineout tempfile,'value="' foo '"'
  636. call lineout tempfile,' SIZE=30 MAXLENGTH=80>'
  637. call lineout tempfile,'<dd>'
  638. call lineout tempfile,' Enter the name of the HTML document to be used as your '
  639. call lineout tempfile,' "default document" (your home page).  This will be used '
  640. call lineout tempfile,' when an empty request selector is recieved. <br>Note that  '
  641. call lineout tempfile,' INDEX.HTM (located in the root of your "data directory") '
  642. call lineout tempfile, ' is often used as the default document.'
  643.  
  644.  
  645.  
  646. /* HOME_DIR */
  647. call lineout tempfile,'<hR><dt> <strong>HOME_DIR</strong>:'
  648. call lineout tempfile,' <INPUT TYPE="text" NAME="HOME_DIR" '
  649. foo=find_val(7)
  650. call lineout tempfile,'value="' foo '"'
  651. call lineout tempfile,' SIZE=30 MAXLENGTH=80>'
  652. call lineout tempfile,'<dd>'
  653. call lineout tempfile,' HOME_DIR is used when a ~ appears in the request selector. '
  654. call lineout tempfile,' Typically, it is a shorthand for a "home directory" --'
  655. call lineout tempfile,' under which personal directories are placed.'
  656. call lineout tempfile,' <br>Advanced option:  include a $ to specify a <em> web subdirectory </em>'
  657. call lineout tempfile,' of the  <em> personal </em> directory.'
  658.  
  659.  
  660. /* NOEXT_TYPE */
  661. call lineout tempfile,'<hR><dt> <strong>NOEXT_TYPE</strong>:'
  662. v.1="NO" ; v.2="DIR" ; V.3="REDIR" ; v.4="HTM" ; v.5="HTML"
  663.   foo=do_radio(27,5)
  664. call lineout tempfile,'<dd> NOEXT_TYPE controls how SRE-FILTER handles request that '
  665. call lineout tempfile,' have no extension, that do not have a ? in them, and that do not '
  666. call lineout tempfile,' end with a /.  <ul> <li> NO : Use as is '
  667. call lineout tempfile,' <li>DIR: Treat as directories (append a / to the end) '
  668. call lineout tempfile,' <li>REDIR: Append a /, and then redirect '
  669. call lineout tempfile,' <li> HTM or HTML : Treat as HTML documents (append a '
  670. call lineout tempfile,' .HTM or a .HTML respectively) </ul>'
  671.  
  672.  
  673.  
  674. /* AUTO_NAME */
  675. call lineout tempfile,'<hR><dt> <strong>AUTO_NAME</strong>:'
  676. call lineout tempfile,' <INPUT TYPE="text" NAME="AUTO_NAME" '
  677. foo=find_val(8)
  678. call lineout tempfile,'value="' foo '"'
  679. call lineout tempfile,' SIZE=30 MAXLENGTH=80>'
  680. call lineout tempfile,'<dd>'
  681. call lineout tempfile,' AUTO_NAME is a space delimited list of "default document for directories".'
  682. call lineout tempfile,' It is used when <code>NOEXT_TYPE=DIR</code>, and a  request for a '
  683. call lineout tempfile, 'directory name (an <code>action</code> that ends with a /) is recieved.'
  684. call lineout tempfile,' <br> Notes: <menu> <li> a *.HTM (or *.HTML)  means "use a file called directory_name.htm (or .html) " </menu> '
  685. call lineout tempfile, ' (if it exists in the requested directory) '
  686. call lineout tempfile,' <li> !CREATE means "create a list of links to each file in the directory '
  687.  
  688.  
  689. /* DIR_OPTIONS */
  690. call lineout tempfile,'<hR><dt> <strong>DIR_OPTIONS</strong>:'
  691. call lineout tempfile,' <INPUT TYPE="text" NAME="DIR_OPTIONS" '
  692. foo=find_val(40)
  693. call lineout tempfile,'value="' foo '"'
  694. call lineout tempfile,' SIZE=50 MAXLENGTH=100>'
  695. call lineout tempfile,'<dd>'
  696. call lineout tempfile," DIR_OPTIONS is used by the DIR: SRE-Filter's built in directory lister."
  697. call lineout tempfile,' <br> It is used to customize the format and content of the directory listing.'
  698. call lineout tempfile,'<br>Notes:<ul><li>DIR_OPTIONS should contain a space-delimited list of options'
  699. call lineout tempfile, '<li> DIR is used when a !CREATE option is included in '
  700. call lineout tempfile,' the AUTO_NAME variable </ul>'
  701.  
  702.  
  703.  
  704. /* DIR_EXCLUSION */
  705. call lineout tempfile,'<hR><dt> <strong>DIR_EXCLUSION</strong>:'
  706. call lineout tempfile,' <INPUT TYPE="text" NAME="DIR_EXCLUSION" '
  707. foo=find_val(41)
  708. call lineout tempfile,'value="' foo '"'
  709. call lineout tempfile,' SIZE=50 MAXLENGTH=100>'
  710. call lineout tempfile,'<dd>'
  711. call lineout tempfile," DIR_EXCLUSION is used by the DIR: SRE-Filter's built in directory lister."
  712. call lineout tempfile,' <br> It is used to indicate files and directories that should <b>not</b> be displayed.'
  713. call lineout tempfile,'<br>Notes:<ul><li>DIR_EXCLUSION should contain a space-delimited list of filenames and directory_names'
  714. call lineout tempfile,' <li> To indicate subdirectories, start the directory_name with a / '
  715. call lineout tempfile, '<li> DIR is used when a !CREATE option is included in '
  716. call lineout tempfile,' <LI> You can use * as a wildcard character '
  717. call lineout tempfile,' the AUTO_NAME variable </ul>'
  718.  
  719.  
  720.  
  721. call lineout tempfile,'</dl>  '
  722. call lineout tempfile,' <hr width=40%>  '
  723. call lineout tempfile,' <A HREF="#section0"><EM>go to top of document</EM></A> '
  724. call lineout tempfile,' <hr width=40%>  '
  725. call lineout tempfile,'<H3><A name="section3"> Access and Auditing </a></H3>'
  726. call lineout tempfile,'<dl> '
  727.  
  728. /* ALLOW_ACCESS */
  729. call lineout tempfile,'<p><dt> <strong>ALLOW_ACCESS</strong>:'
  730.   v.1="YES" ; v.2="INHOUSE" ; v.3="NO"
  731.   foo=do_radio(9,3)
  732. call lineout tempfile,'<dd>ALLOW_ACCESS turns on and off "URL" specific access control'
  733. call lineout tempfile,' <ul> <LI>YES = Do not check (allow all requests to go through'
  734. call lineout tempfile,' <LI> INHOUSE = Check access privileges of everyone except OWNERS or INHOUSE requesters.'
  735. call lineout tempfile,' <LI>  NO = Check access privileges of everyone except OWNERS '
  736. call lineout tempfile, ' (those with SUPERUSER privileges) </ul>'
  737. call lineout tempfile,' Notes: <menu><li> ALLOW_ACCESS uses the ACCESS_FILE to store file-specific access information'
  738. call lineout tempfile,'  </ul>'
  739.  
  740.  
  741. /* DO_HTACCESS */
  742. call lineout tempfile,'<hr><dt> <strong>DO_HTACCESS</strong>:'
  743. htfile=get_value('DO_HTACCESS')
  744.   v.1="YES" ;  v.2="NO"
  745.   foo=do_radio(34,2)
  746. call lineout tempfile,'<dd>DO_HTACCESS turns on and off the HTACCESS-file method "directory" specific access controls'
  747. call lineout tempfile,' <ul> <LI>YES = Look for, and use, HTACCESS files to control access '
  748. call lineout tempfile,' <LI>  NO = Do not attempt to use HTACCESS files </ul>'
  749. call lineout tempfile,' Notes: <menu><li> ALLOW_ACCESS and DO_HTACCESS can be used simultaneously '
  750. call lineout tempfile,'<li> The  name of (directory specific) HTACCESS file is set using the <var>HTACCESS_FILE</var> variable.'
  751. call lineout tempfile,' <br> <var> HTACCESS_FILE </var> is currently:<strong> ' htfile '</strong>'
  752.  
  753. call lineout tempfile,'  </ul>'
  754.  
  755.  
  756. /* write common-log */
  757. call lineout tempfile,'<hr><dt> <strong>WRITE_LOGS</strong>:'
  758.   v.1="YES" ; v.2="NO"
  759.   foo=do_radio(43,2)
  760. call lineout tempfile,'<dd> WRITE_LOGS instructs SRE-FILTER to record requests in'
  761. call lineout tempfile,' the <b>common-log</b> audit file (and in the browser and referer log files).'
  762. call lineout tempfile,' <ul> <LI> NO = Do  <b>NOT</b> record requests in the log files.'
  763. call lineout tempfile,' <LI>YES =Record requests </ul>'
  764. call lineout tempfile,' Note: see the SREFLOGS.INI file for additional common-log options. <br>'
  765.  
  766.  
  767. /*RECORD_OPTION */
  768. call lineout tempfile,'<hr><dt> <strong>RECORD_OPTION</strong>:'
  769.   v.1="YES" ; v.2="YES_ALL" ; v.3="FILE" ; v.4="NO" ; 
  770.   foo=do_radio(10,4)
  771. call lineout tempfile,'<dd> RECORD_OPTION turns on and off "recording all requests"'
  772. call lineout tempfile,' <ul> <LI>YES = Record all requests, but remove arguments (such as <code>?xxx</code>) first'
  773. call lineout tempfile,' <LI>YES_ALL = Record all requests, but do not remove "arguments" '
  774. call lineout tempfile,' (this can lead to a lot of unique entries!) '
  775. call lineout tempfile,' <li> FILE = Record all request by absolute file name (rather then by "URL") '
  776. call lineout tempfile,' <LI>  NO = Do not record all requests </ul>'
  777. call lineout tempfile,' Notes: <br>'
  778. call lineout tempfile,' i) RECORD_OPTIONS uses the RECORD_ALL_FILE to keep track of the number '
  779. call lineout tempfile,' of requests recieved, and the date of the most recent request.<br>'
  780. call lineout tempfile,' ii) Requests that are not "honored" (due to logon or access constraints) are NOT recorded'
  781.  
  782.  
  783. /* hit_cache_len and hit_cache_duration */
  784. call lineout tempfile,' <hr> <dt> <strong> HIT_CACHE_LEN: '
  785. call lineout tempfile,' <INPUT TYPE="text" NAME="HIT_CACHE_LEN" '
  786. foo=find_val(36)
  787. call lineout tempfile,'value="' strip(foo) '" '
  788. call lineout tempfile,' SIZE=10 HIT_CACHE_DURATION=10> <br>'
  789. call lineout tempfile,' HIT_CACHE_DURATION: </strong>'
  790. call lineout tempfile,' <INPUT TYPE="text" NAME="HIT_CACHE_DURATION" '
  791. foo=find_val(37)
  792. call lineout tempfile,', value="' strip(foo)'" '
  793. call lineout tempfile,' SIZE=10 MAXLENGTH=10>'
  794.  
  795. call lineout tempfile,'<dd>'
  796. call lineout tempfile,' The HIT_CACHE_ variables are used to prevent recording of "false requests",'
  797. call lineout tempfile,' that occur when a client repetitively reloads a document<br>'
  798. call lineout tempfile,'  HIT_CACHE_LEN is the size (in kilo bytes) of the recent requests storage cache<br>'
  799. call lineout tempfile,' <blockquote> On busy sites, small values of this will cause entries to be prematurely lost.'
  800. call lineout tempfile,' To prevent this, use a value of FILE  -- entries will be stored in a file'
  801. call lineout tempfile,' (this is slower, but should not overload) </blockquote>'
  802. call lineout tempfile,' HIT_CACHE_DURATION is the time (in minutes) each entry is retained.<p>'
  803. call lineout tempfile,' Note that each entry contains a request selector and client IP address '
  804. call lineout tempfile,' (averaging around 50 bytes). '
  805.  
  806.  
  807. call lineout tempfile,'<hr><dt> <strong>HIT_OWNER_SUPPRESS</strong>:'
  808.   v.1="YES" ; v.2="NO"
  809.   foo=do_radio(38,2)
  810. call lineout tempfile,'<dd> HIT_OWNER_SUPPRESS instructs SRE-FILTER to <b>not</b> record '
  811. call lineout tempfile,' from <b>OWNERS</b> (as listed in the OWNERS variable).'
  812. call lineout tempfile,' <ul> <LI>YES = Do NOT record such requests.'
  813. call lineout tempfile,' <LI>NO =allow recording </ul>'
  814.  
  815.  
  816. call lineout tempfile,'<hr><dt> <strong>CHECK_ADD_PRIVS</strong>:'
  817.   v.1="YES" ; v.2="NO"
  818.   foo=do_radio(39,2)
  819. call lineout tempfile,'<dd> CHECK_ADD_PRIVS instructs SRE-FILTER to check the dynamic privileges <code>cache</code>. '
  820. call lineout tempfile," <Ul> <li>YES = Check the dynamic privileges cache for entries that match this client's IP address"
  821. call lineout tempfile,' <LI> NO = Do not check </ul>'
  822. call lineout tempfile,' <em> The dynamic-privileges <code>cache</code> is used to grant additional, "transient", '
  823. call lineout tempfile,' privileges to a client.</em>'
  824.  
  825.  
  826. call lineout tempfile,'</dl>  '
  827. call lineout tempfile,' <hr width=40%>  '
  828. call lineout tempfile,' <A HREF="#section0"><EM>go to top of document</EM></A> '
  829. call lineout tempfile,' <hr width=40%>  '
  830. call lineout tempfile,' <H3><a name="section4">Response Header, Pre-filter, and Uploading </a></H3>'
  831. call lineout tempfile,' <dl> '
  832.  
  833.  
  834. /*AUTO_HEADER */
  835. call lineout tempfile,'<p><dt> <strong>AUTO_HEADER</strong>:'
  836.   v.1="NO" ; v.2="HEAD" ; v.3="ALWAYS"
  837.   foo=do_radio(24,3)
  838. call lineout tempfile,'<dd> AUTO_HEADER controls the "automatic creation of response headers"'
  839. call lineout tempfile,'<ul> <LI>NO = Do not create additional response headers '
  840. call lineout tempfile,'<LI>HEAD = Automatic creation of response headers for HEAD requests'
  841. call lineout tempfile,'<LI>ALWAYS= Automatic creation of response headers fo GET and  HEAD requests'
  842. call lineout tempfile,'</ul> Note: When active, LINK and META HTTP-EQUIV elements found in the '
  843. call lineout tempfile,'<HEAD> portion of an HTML document are used to generate additional response headers'
  844.  
  845. /*PRE_FILTER */
  846. call lineout tempfile,'<hr><dt> <strong>PRE_FILTER</strong>:'
  847.   v.1="NO" ; v.2="YES" ; v.3="FIRST"
  848.   foo=do_radio(29,3)
  849. call lineout tempfile,'<dd> PRE_FILTER controls whether the PREFILTR  "pre-filter" is called '
  850. call lineout tempfile,' before SRE-FILTER processes the request .'
  851. call lineout tempfile,' <ul> <li> NO = Do not call a pre-filter '
  852. call lineout tempfile,'  <li> YES =Call a pre-filter after ascertaining logon rights'
  853. call lineout tempfile,' <li> FIRST = Call a pre-filter before anything else </ul>'
  854. call lineout tempfile,'<br> Notes: <menu><li>The default pre-filter procedure is PREFILTR.80'
  855. call lineout tempfile,' <li> To change the name of the pre-filter procedure, '
  856. call lineout tempfile,' you will have to "hand edit" the PREFILTER_NAME parameter'
  857. call lineout tempfile," <li> SRE-FILTER's default pre-filter (PREFILTR.80) implements"
  858. call lineout tempfile,' the GoRemote server remote control package.'
  859. call lineout tempfile,' <li><em>Suggestion:</em>To perform simple load balancing, change the BackupServerList and '
  860. call lineout tempfile,' LoadThreshold variables in SREFILTER.80 (see INITFILT.DOC for details)</menU>'
  861.  
  862. /*POST_FILTER */
  863. call lineout tempfile,'<hr><dt> <strong>POST_FILTER</strong>:'
  864.   v.1="YES" ; v.2="NO"
  865.   foo=do_radio(28,2)
  866. call lineout tempfile,'<dd> POST_FILTER instructs SRE-FILTER to call a set of "post-filters"'
  867. call lineout tempfile,' <ul> <LI>YES = Call the post-filter procedure(s).'
  868. call lineout tempfile,' <LI>NO = do not call </ul>'
  869. call lineout tempfile,' If POST_FILTER=YES, then the postfilter(s) will be called <strong>after</strong>'
  870. call lineout tempfile,' the response has been sent to the client '
  871. call lineout tempfile,' <br> Notes: <menu> <LI> The default Post-filter is POSTFILT.80 '
  872. call lineout tempfile,' <li> To change the name(s) of the pre-filter procedure,'
  873. call lineout tempfile,'  you will have to "hand edit" the POSTFILTER_NAME parameter.'
  874. call lineout tempfile,' <li> SRE-Filter includes a few sample post-filters (POSTMAIL.80 and POSTRCRD.80) </menu>'
  875.  
  876.  
  877. /* SSI_SHTML_ONLY */
  878. call lineout tempfile,'<hr><dt> <strong>SSI_SHTML_ONLY</strong>:'
  879.   v.1="YES" ; v.2="NO"
  880.   foo=do_radio(32,2)
  881. call lineout tempfile,'<dd> SSI_SHTML_ONLY is used to tell SRE-Filter to attempt '
  882. call lineout tempfile,' server side includes <em> only </em> on files with a "SHTML" '
  883. call lineout tempfile,' extension -- other html/text files (say, with .HTM or .HTML'
  884. call lineout tempfile,' extensions) will NOT be checked for server side includes. '
  885. call lineout tempfile,'<p> Select <b>YES</b> to turn SSI_SHTML_ONLY on, '
  886. call lineout tempfile,'<Br> <b>NO</b> to attempt server side includes on all html/text files '
  887. call lineout tempfile,'<p>Notes:<menu><li> SRE-Filter defines four extensions as "SHTML extensions": '
  888. call lineout tempfile,' .SHTML, .SHT, .HTM-SSI and .HTML-SSI.'
  889. call lineout tempfile,' <li> To add or modify this list, change the SSI_EXTENSIONS variable '
  890. call lineout tempfile,' (see INITFILT.DOC for details) </menu>'
  891.  
  892. /* SSI_CACHE_ON*/
  893. call lineout tempfile,'<hr><dt> <strong>SSI_CACHE_ON</strong>:'
  894.   v.1="YES" ; v.2="NO"
  895.   foo=do_radio(42,2)
  896. call lineout tempfile,'<dd> SSI_CACHE_ON is used to enable the <em>server side include cache </em>'
  897. call lineout tempfile,' (the SSI-CACHE). <p> '
  898. call lineout tempfile,' The SSI-cache is used to store "compiled" versions of HTML documents that '
  899. call lineout tempfile,' contain server side includes.  When a request for such document arrives,'
  900. call lineout tempfile,' SRE-Filter will return it (perhaps with further modifications).'
  901. call lineout tempfile,' <blockquote> Turning off caching is sometimes useful (or necessary) in highly'
  902. call lineout tempfile,'   dynamic environments; say, where INCLUDE files are constantly changing.</blockquote>'
  903. call lineout tempfile,"For more information on SRE-Filter's server side include caching "
  904. call lineout tempfile,'algorithim, see <a href="/samples/ssicache.htm">SSICACHE.HTM </a>'
  905.  
  906.  
  907. /*SMTP_GATEWAY */
  908. call lineout tempfile,'<hr><dt> <strong>SMTP_GATEWAY</strong>:'
  909. call lineout tempfile,' <INPUT TYPE="text" NAME="SMTP_GATEWAY" '
  910. foo=find_val(31)
  911. call lineout tempfile,'value="' foo '"'
  912. call lineout tempfile,' SIZE=30 MAXLENGTH=80>'
  913. call lineout tempfile,"<dd> SMTP_GATEWAY is used by SRE-FILTER's <em>e-mail alert</em> facility "
  914. call lineout tempfile," (as implemented in the POSTMAIL.80 post-filter routine). "
  915. call lineout tempfile,' SMTP_GATEWAY should contain the name of your SMTP mail server. <br> '
  916. call lineout tempfile,' If you do not know it, or do not need to use e-mail alerts, leave this field empty (or set it to 0)<p>'
  917. call lineout tempfile,' For more details on SMTP_GATEWAY, see POSTMAIL.80 '
  918.  
  919. /* UPLOAD_Minfree and upload_maxsize */
  920. call lineout tempfile,' <hr> <dt> <strong> UPLOAD_MINFREE: '
  921. call lineout tempfile,' <INPUT TYPE="text" NAME="UPLOAD_MINFREE" '
  922. foo=find_val(26)
  923. call lineout tempfile,'value="' strip(foo) '" '
  924. call lineout tempfile,' SIZE=10 MAXLENGTH=10>'
  925. call lineout tempfile,' , and UPLOAD_MAXSIZE: </strong>'
  926. call lineout tempfile,' <INPUT TYPE="text" NAME="UPLOAD_MAXSIZE" '
  927. foo=find_val(25)
  928. call lineout tempfile,', value="' strip(foo)'" '
  929. call lineout tempfile,' SIZE=10 MAXLENGTH=10>'
  930. call lineout tempfile,'<dd>'
  931. call lineout tempfile,' The UPLOAD_ variables are needed when GET_URL is used to upload '
  932. call lineout tempfile,' files from another server. <pr>'
  933. call lineout tempfile,' UPLOAD_MINFREE is the amount of space (in K bytes) that must be free '
  934. call lineout tempfile,' in the UPLOAD_DIRECTORY <em> after </em> the file has been uploaded.'
  935. call lineout tempfile,' <br> UPLOAD_MAXSIZE is the maximum allowable size (in K bytes) of a uploaded file '
  936. call lineout tempfile, '<p> If either of these limits are exceeded, the file will <strong> not </strong> be uploaded.'
  937.  
  938.  
  939. call lineout tempfile,'</dl>  '
  940. call lineout tempfile,' <hr width=40%>  '
  941. call lineout tempfile,' <A HREF="#section0"><EM>go to top of document</EM></A> '
  942. call lineout tempfile,' <hr width=40%>  '
  943. call lineout tempfile,' <h3> <a name="section5">  String Replacements </a> </h3>'
  944. call lineout tempfile,' <dl> '
  945.  
  946. /* headers */
  947. foo=find_val(12)
  948. call lineout tempfile,'<p><dt> <strong>HEADERS.</strong>:'
  949. call lineout tempfile,' <TEXTAREA NAME="'||param.12||'." ROWS=4 COLS=25>'
  950. call lineout tempfile,foo
  951. call lineout tempfile,'</TEXTAREA>'
  952. call lineout tempfile,'<dd> HEADERS. are added to the top of all requested HTML '
  953. call lineout tempfile,' documents (they are added just after the first <BODY> tag).'
  954.  
  955. call lineout tempfile,' You should enter valid HTML code in this box '
  956. call lineout tempfile,' (or leave it blank if you do not want a HEADER added). '
  957. call lineout tempfile,' Note that HEADERS can contain keyphrases. '
  958.  
  959. /* footers */
  960. foo=find_val(13)
  961. call lineout tempfile,'<hr><dt> <strong>FOOTERS.</strong>:'
  962. call lineout tempfile,' <TEXTAREA NAME="'||param.13||'." ROWS=4 COLS=25>'
  963. call lineout tempfile,foo
  964. call lineout tempfile,'</TEXTAREA>'
  965. call lineout tempfile,'<dd> FOOTERS. are added to the top of all requested HTML '
  966. call lineout tempfile,' documents (they are added just before  the last </BODY> tag).'
  967. call lineout tempfile,' You should enter valid HTML code in this box '
  968. call lineout tempfile,'(or leave it blank if you do not want a FOOTER added). '
  969. call lineout tempfile,' Note that FOOTERS can contain keyphrases. '
  970.  
  971. /* inhouse. */
  972. foo=find_val(14)
  973. if strip(foo)=0 then foo=" "
  974. call lineout tempfile,'<hr><dt> <strong>INHOUSE.</strong>:'
  975. call lineout tempfile,' <TEXTAREA NAME="'||param.14||'." ROWS=4 COLS=65>'
  976. call lineout tempfile,foo
  977. call lineout tempfile,'</TEXTAREA>'
  978. call lineout tempfile,'<dd> The INHOUSE. variable(s) are used by the REPLACE INHOUSE.n keyphrase'
  979. call lineout tempfile,' Each line of this box corresponds to a different value of n '
  980. call lineout tempfile,' -- the first line is for INHOUSE.1, the second for INHOUSE.2, etc.'
  981.  
  982. /* SUPERUSER. */
  983. foo=find_val(15)
  984. call lineout tempfile,'<hr><dt> <strong>SUPERUSER.</strong>:'
  985. if strip(foo)=0 then foo=" "
  986. call lineout tempfile,' <TEXTAREA NAME="'||param.15||'." ROWS=4 COLS=65>'
  987. call lineout tempfile,foo
  988. call lineout tempfile,'</TEXTAREA>'
  989. call lineout tempfile,'<dd> The SUPERUSER. variable(s) are used by the REPLACE SUPERUSER.n keyphrase'
  990. call lineout tempfile,' Each line of this box corresponds to a different value of n '
  991. call lineout tempfile,' -- the first line is for SUPERUSER.1, the second for SUPERUSER.2, etc.'
  992.  
  993.  
  994. /* webmaster */
  995. call lineout tempfile,'<hR><dt> <strong>WEBMASTER</strong>:'
  996. foo=find_val(16)
  997. call lineout tempfile, ' <TEXTAREA NAME="WEBMASTER" ROWS=1 COLS=68>' foo
  998. call lineout tempfile, ' </TEXTAREA>'
  999. call lineout tempfile,'<dd>'
  1000. call lineout tempfile,' The WEBMASTER variable is used in the REPLACE WEBMASTER keyphrase,'
  1001. call lineout tempfile,' and is used in some internally generated messages.  It should contain'
  1002. call lineout tempfile,' a contact address (preferably as a MAILTO URL) of the site''s "webmaster"'
  1003.  
  1004.  
  1005. /*HOME_NAME */
  1006. call lineout tempfile,'<hR><dt> <strong>HOME_NAME</strong>:'
  1007. call lineout tempfile,' <INPUT TYPE="text" NAME="HOME_NAME" '
  1008. foo=find_val(17)
  1009. call lineout tempfile,'value="' foo '"'
  1010. call lineout tempfile,' SIZE=30 MAXLENGTH=80>'
  1011. call lineout tempfile,'<dd>'
  1012. call lineout tempfile,' HOME_NAME is used in the REPLACE HOME_NAME keyphrase, and  is'
  1013. call lineout tempfile,' used in the default Not Found response (see below).  It should contain the '
  1014. call lineout tempfile,' commonly-used name of your organization (not necessarily the IP name!)'
  1015.  
  1016.  
  1017. call lineout tempfile,'</dl>  '
  1018. call lineout tempfile,' <hr width=40%>  '
  1019. call lineout tempfile,' <A HREF="#section0"><EM>go to top of document</EM></A> '
  1020. call lineout tempfile,' <hr width=40%>  '
  1021. call lineout tempfile,' <h3> <a name="section5a">  Miscellaneous  </a> </h3>'
  1022. call lineout tempfile,' <dl> '
  1023.  
  1024.  
  1025. /*the_realm */
  1026. call lineout tempfile,'<hR><dt> <strong>THE_REALM</strong>:'
  1027. call lineout tempfile,' <INPUT TYPE="text" NAME="the_realm" '
  1028. foo=find_val(18)
  1029. call lineout tempfile,'value="' foo '"'
  1030. call lineout tempfile,' SIZE=30 MAXLENGTH=80>'
  1031. call lineout tempfile,'<dd>'
  1032. call lineout tempfile,' THE_REALM is the realm name that will be shown to the client '
  1033. call lineout tempfile,' when  a username/password is requested.  Note that the "realm"'
  1034. call lineout tempfile,' value for a url that is contained in the ACCESS_FILE is also used '
  1035. call lineout tempfile,' (THE_REALM is used first). '
  1036.  
  1037.  
  1038.  
  1039. /*option_hIT_LINE */
  1040. call lineout tempfile,'<hR><dt> <strong>OPTION_HIT_LINE</strong>:'
  1041. call lineout tempfile,' <INPUT TYPE="text" NAME="OPTION_HIT_LINE" '
  1042. foo=find_val(19)
  1043. call lineout tempfile,'value="' foo'"'
  1044. call lineout tempfile,' SIZE=30 MAXLENGTH=80>'
  1045. call lineout tempfile,'<dd> OPTION_HIT_LINE is used by the REPLACE OPTION_HITS.n keyphrase'
  1046.  
  1047.  
  1048. /*NOT_FOUND_URL */
  1049. call lineout tempfile,'<hR><dt> <strong>NOT_FOUND_URL</strong>:'
  1050. foo=find_val(20)
  1051. call lineout tempfile, ' <TEXTAREA NAME="NOT_FOUND_URL" ROWS=1 COLS=60>' foo
  1052. call lineout tempfile, ' </TEXTAREA>'
  1053. call lineout tempfile,'<dd> NOT_FOUND_URL is a string that is displayed when a Not Found '
  1054. call lineout tempfile,' response is generated (say, when a requested file can not be found).'
  1055. call lineout tempfile,' Typically it will contain a link to your home page, or some other ';
  1056. call lineout tempfile,' "catchall" document.  Note that HOME_NAME is used in the default '
  1057. call lineout tempfile,' definition of NOT_FOUND_URL '
  1058.  
  1059. /* FIX_EXPIRE */
  1060. call lineout tempfile,' <hr> <dt> <strong> FIX_EXPIRE: </strong> '
  1061. call lineout tempfile,' <INPUT TYPE="text" NAME="FIX_EXPIRE" '
  1062. foo=find_val(35)
  1063. call lineout tempfile,'value="' foo '" '
  1064. call lineout tempfile,' SIZE=10 MAXLENGTH=10>'
  1065. call lineout tempfile,'<dd>'
  1066. call lineout tempfile,' The FIX_EXPIRE variable is used to suppress "immediate expiraton" of '
  1067. call lineout tempfile,'  documents containing server side includes, and documents generated by CGI-BIN scripts.'
  1068. call lineout tempfile,' <BR> <em> "Immediate expiration" can cause annoying reloads when clients use the back '
  1069. call lineout tempfile,' arrow key on their browsers </em> <br>'
  1070. call lineout tempfile,' <br> Set FIX_EXPIRE to a fractional value  '
  1071. call lineout tempfile,' to indicate a future expiration date (in 24hrs * FIX_EXPIRE). '
  1072. call lineout tempfile,' <br> To suppress this (and use default "immediate expiration"), set this to 0'
  1073.  
  1074.  
  1075.  
  1076. call lineout tempfile,' </dl> '                 /* END OF PARAMTERS LIST */
  1077. call lineout tempfile,' <A HREF="#section0"><EM>go to top of document</EM></A> '
  1078.  
  1079.  
  1080.  
  1081. /* === File info SECTION === */
  1082.  
  1083. wow=find_fnames()
  1084.  
  1085. call lineout tempfile,'<hr> <h3> <a name="section6"> File & Directory Names </a> </h3>'
  1086. if nickname<>' ' then
  1087.   call lineout tempfile,' <em> File and directory names are <strong>not</strong> host-specific </em><p>'
  1088.   call lineout tempfile,' <br> <b> We recommend restarting GoServe immediately after changing any of these filenames or directories!</b>'
  1089. call lineout tempfile,'<dl> <dt> <br> ' fd.1 ' = '
  1090. call lineout tempfile,'<INPUT TYPE="text" NAME="'||fd.1||'"  VALUE="'||fd.1.val||'"  '
  1091. call lineout tempfile,' SIZE=30 MAXLENGTH=60>'
  1092. Call lineout tempfile,' <dd> The MESSBOX_DIR is where the SRE-FILTER message boxes are stored'
  1093.  
  1094. call lineout tempfile,'<dt> <br> ' fd.15 ' = '
  1095. call lineout tempfile,'<INPUT TYPE="text" NAME="'||fd.15||'"  VALUE="'||fd.15.val||'"  '
  1096. call lineout tempfile,' SIZE=30 MAXLENGTH=60>'
  1097. Call lineout tempfile,' <dd> The TEMPDATA_DIR is where SRE-Filter puts temporary  files;  '
  1098. call lineout tempfile,' such as the $xxxx.80 temporary response files, and the SSI-Cache files.'
  1099. call lineout tempfile,' It is <b>not</b> supposed to be used by <em> user supplied programs </em> (see TEMPFILE_DIR) .'
  1100.  
  1101. call lineout tempfile,'<dt> <br> ' fd.2 ' = '
  1102. call lineout tempfile,'<INPUT TYPE="text" NAME="'||fd.2||'"  VALUE="'||fd.2.val||'"  '
  1103. call lineout tempfile,' SIZE=30 MAXLENGTH=60>'
  1104. Call lineout tempfile,' <dd> The TEMPFILE_DIR is working space for your various <em> user supplied programs </em>'
  1105.  
  1106.  
  1107. call lineout tempfile,'<dt> <br> ' fd.16 ' = '
  1108. call lineout tempfile,'<INPUT TYPE="text" NAME="'||fd.16||'"  VALUE="'||fd.16.val||'"  '
  1109. call lineout tempfile,' SIZE=30 MAXLENGTH=60>'
  1110. Call lineout tempfile,' <dd> The WORKDATA_DIR is where SRE-Filter puts username, alias, access control'
  1111. call lineout tempfile, ' and other permanent data files.'
  1112.  
  1113.  
  1114. call lineout tempfile,'<dt> <br> ' fd.11 ' = '
  1115. call lineout tempfile,'<INPUT TYPE="text" NAME="'||fd.11||'"  VALUE="'||fd.11.val||'"  '
  1116. call lineout tempfile,' SIZE=30 MAXLENGTH=60>'
  1117. Call lineout tempfile,' <dd> The UPLOAD_DIR is where "uploaded" files will be put. '
  1118.  
  1119. call lineout tempfile,'<dt> <br> ' fd.12 ' = '
  1120. call lineout tempfile,'<INPUT TYPE="text" NAME="'||fd.12||'"  VALUE="'||fd.12.val||'"  '
  1121. call lineout tempfile,' SIZE=30 MAXLENGTH=60>'
  1122. Call lineout tempfile,' <dd> The CGI_BIN_DIR is where "CGI-BIN" programs should be stored. '
  1123.  
  1124. call lineout tempfile,'<dt> <br> ' fd.14 ' = '
  1125. call lineout tempfile,'<INPUT TYPE="text" NAME="'||fd.14||'"  VALUE="'||fd.14.val||'"  '
  1126. call lineout tempfile,' SIZE=30 MAXLENGTH=60>'
  1127. call lineout tempfile,"<dd> The MAILBOX_DIR is where SRE-Filter's will read and write e-mail messages from"
  1128. call lineout tempfile,' (it should be the "inbox" directory of an SMTP server).'
  1129.  
  1130. call lineout tempfile,'<dt> <br> ' fd.3 ' = '
  1131. call lineout tempfile,'<INPUT TYPE="text" NAME="'||fd.3||'"  VALUE="'||fd.3.val||'"  '
  1132. call lineout tempfile,' SIZE=30 MAXLENGTH=60>'
  1133. Call lineout tempfile,' <dd> The COUNTER_FILE is where the REPLACE HITS and REPLACE COUNTS '
  1134. call lineout tempfile,' keyphrases store the "number of hits" statistics. '
  1135.  
  1136.  
  1137. call lineout tempfile,'<dt> <br> ' fd.4 ' = '
  1138. call lineout tempfile,'<INPUT TYPE="text" NAME="'||fd.4||'"  VALUE="'||fd.4.val||'"  '
  1139. call lineout tempfile,' SIZE=30 MAXLENGTH=60>'
  1140. Call lineout tempfile,' <dd> The RECORD_ALL_FILE is where the RECORD_OPTIONS stores the '
  1141. call lineout tempfile,' "number of hits " statistics. '
  1142.  
  1143.  
  1144.  
  1145. call lineout tempfile,'<dt> <br> ' fd.5 ' = '
  1146. call lineout tempfile,'<INPUT TYPE="text" NAME="'||fd.5||'"  VALUE="'||fd.5.val||'"  '
  1147. call lineout tempfile,' SIZE=30 MAXLENGTH=60>'
  1148. Call lineout tempfile,' <dd> The SENDFILE_FILE is where the SENDFILE facility stores "number of hits"'
  1149. call lineout tempfile,' statistics" '
  1150.  
  1151.  
  1152. call lineout tempfile,'<dt> <br> ' fd.10 ' = '
  1153. call lineout tempfile,'<INPUT TYPE="text" NAME="'||fd.10||'"  VALUE="'||fd.10.val||'"  '
  1154. call lineout tempfile,' SIZE=30 MAXLENGTH=60>'
  1155. Call lineout tempfile,' <dd> The UPLOAD_LOG is where information on uploaded files '
  1156. call lineout tempfile,' will be stored.  If you do not want to store such info, enter <strong>0</strong> '
  1157.  
  1158.  
  1159.  
  1160. call lineout tempfile,'<dt> <br> ' fd.6 ' = '
  1161. call lineout tempfile,'<INPUT TYPE="text" NAME="'||fd.6||'"  VALUE="'||fd.6.val||'"  '
  1162. call lineout tempfile,' SIZE=30 MAXLENGTH=60>'
  1163. Call lineout tempfile,' <dd> The ACCESS_FILE is where  ALLOW_ACCESS looks for action-specific'
  1164. call lineout tempfile,' access information'
  1165.  
  1166.  
  1167. call lineout tempfile,'<dt> <br> ' fd.7 ' = '
  1168. call lineout tempfile,'<INPUT TYPE="text" NAME="'||fd.7||'"  VALUE="'||fd.7.val||'"  '
  1169. call lineout tempfile,' SIZE=30 MAXLENGTH=60>'
  1170. Call lineout tempfile,' <dd> The ALIAS_FILE contains the lists of ALIASES '
  1171.  
  1172. call lineout tempfile,'<dt> <br> ' fd.13 ' = '
  1173. call lineout tempfile,'<INPUT TYPE="text" NAME="'||fd.13||'"  VALUE="'||fd.13.val||'"  '
  1174. call lineout tempfile,' SIZE=30 MAXLENGTH=60>'
  1175. Call lineout tempfile,' <dd> The VIRTUAL_FILE contains the "virtual directory" list '
  1176.  
  1177. call lineout tempfile,'<dt>  <br> ' fd.8 ' = '
  1178. call lineout tempfile,'<INPUT TYPE="text" NAME="'||fd.8||'"  VALUE="'||fd.8.val||'"  '
  1179. call lineout tempfile,' SIZE=30 MAXLENGTH=60>'
  1180. Call lineout tempfile,' <dd> The REPSTRGS_FILE contains the list of custom "variable names" '
  1181. call lineout tempfile,' for use by the REPLACE keyphrase '
  1182.  
  1183.  
  1184. call lineout tempfile,'<dt> <br> ' fd.9 ' = '
  1185. call lineout tempfile,'<INPUT TYPE="text" NAME="'||fd.9||'"  VALUE="'||fd.9.val||'"  '
  1186. call lineout tempfile,' SIZE=30 MAXLENGTH=60>'
  1187. Call lineout tempfile,' <dd> The USER_FILE contains logon/password/privileges information '
  1188.  
  1189. call lineout tempfile,'<dt> <br> ' fd.17 ' = '
  1190. call lineout tempfile,'<INPUT TYPE="text" NAME="'||fd.17||'"  VALUE="'||fd.17.val||'"  '
  1191. call lineout tempfile,' SIZE=30 MAXLENGTH=60>'
  1192. Call lineout tempfile,' <dd> The LOGON_FAIL_FILE is sent when a logon-failure occurs.'
  1193. call lineout tempfile,' <br> The LOGON_FAIL_FILE should contain an "absolute" file name (i.e.;<code> D:\GOSERVE\LOGFAIL.HTM</code>)'
  1194. call lineout tempfile,' <br> If you want to use the generic response, set this to 0. '
  1195. call lineout tempfile,' <br><em> Note that if the LOGON_FAIL_FILE is an HTML document, '
  1196. call lineout tempfile,' SRE-Filter will perform a few textual substitutions.</em> '
  1197.  
  1198. call lineout tempfile,'<dt> <br> ' fd.18 ' = '
  1199. call lineout tempfile,'<INPUT TYPE="text" NAME="'||fd.18||'"  VALUE="'||fd.18.val||'"  '
  1200. call lineout tempfile,' SIZE=30 MAXLENGTH=60>'
  1201. Call lineout tempfile,' <dd> The ACCESS_FAIL_FILE is sent when "SEL-specific" access is not allowed.'
  1202. call lineout tempfile,' <br> The ACCESS_FAIL_FILE should contain an "absolute" file name (i.e.;<code> D:\GOSERVE\ACCFAIL.HTM</code>)'
  1203. call lineout tempfile,' <br> If you want to use the generic response, set this to 0. '
  1204. call lineout tempfile,' <br><em> Note that if the ACCESS_FAIL_FILE is an HTML document, '
  1205. call lineout tempfile,' SRE-Filter will perform a few textual substitutions.</em> '
  1206.  
  1207. /* ----- no longer officially supported
  1208. call lineout tempfile,'<dt> <br> ' fd.10 ' = '
  1209. call lineout tempfile,'<INPUT TYPE="text" NAME="'||fd.10||'"  VALUE="'||fd.10.val||'"  '
  1210. call lineout tempfile,' SIZE=30 MAXLENGTH=60>'
  1211. Call lineout tempfile,' <dd> The INTERPRET_FILE contains the "REXX-code blocks" used by the '
  1212. call lineout tempfile,' INTERPRET keyphrase '
  1213. */
  1214.  
  1215. call lineout tempfile,'</dl>'           /* end OF FILE INFO SECTION */
  1216.  
  1217. call lineout tempfile,' <A HREF="#section0"><EM>go to top of document</EM></A> '
  1218.  
  1219.  
  1220. /* Retain current file contents */
  1221. pud=0
  1222.  do bob=1 to filelines.0
  1223.     if filelines.bob.igot=1 then iterate
  1224.     pud=pud+1
  1225.     dog=filelines.bob
  1226.     DOG=sref_REPLACESTRG(DOG,'"','%22','ALL')
  1227.     DOG=sref_REPLACESTRG(DOG,"'",'%27','ALL')
  1228.     DOG=sref_REPLACESTRG(DOG,"+",'%2B','ALL')
  1229.     dog=sref_replacestrg(dog,'&','%26','ALL')
  1230.     DOG=sref_REPLACESTRG(DOG,"<",'%3c','ALL')
  1231.     DOG=sref_REPLACESTRG(DOG,">",'%3e','ALL')
  1232.  
  1233.     DOG=translate(DOG,"+",' ')
  1234.  
  1235.    call lineout tempfile,'<INPUT TYPE="hidden" NAMe="lines.'||pud|| '" value="'||DOG||'" >'
  1236.  
  1237. /*   dog0=strip(filelines.bob.name)
  1238.    call lineout tempfile,'    <INPUT TYPE="hidden" NAMe="lines_name.'||pud|| '" value="'||DOG0||'" >'*/
  1239.  
  1240.  
  1241.  end
  1242.  call lineout tempfile,'<INPUT TYPE="hidden" NAMe="nickname" value="'||nickname||'" >'
  1243.  call lineout tempfile,'<INPUT TYPE="hidden" NAMe="lines.0" value="'||PUD||'" >'
  1244.  
  1245.  
  1246.   call lineout tempfile,'<p> <EM>if you are done you can</EM> <INPUT TYPE="submit" VALUE="make the changes">,'
  1247.   call lineout tempfile,' <EM>or you can </EM><INPUT TYPE="reset" VALUE="reset to current values">'
  1248.   call lineout tempfile,'</FORM> <hr>'
  1249.   call lineout tempfile,' <h3>Special feature: Look up an IP address </h3>'
  1250.    call lineout tempfile,' For several of these variables (i.e.; OWNERS), numeric IP '
  1251.   call lineout tempfile,' addresses are expected.  If you need to lookup a numeric address:'
  1252.   call lineout tempfile,'  <FORM ACTION="!host" METHOD="GET">'
  1253.   call lineout tempfile,'  <em> enter the IP name here and Look It Up: </em> '
  1254.   call lineout tempfile,'  <INPUT TYPE="text" NAME=""  VALUE=""  SIZE=25 MAXLENGTH=25>'
  1255.   call lineout tempfile,'  <INPUT TYPE="submit" VALUE=" Look It Up"> </form>'
  1256.  
  1257.  
  1258.   call lineout tempfile,' <hr> </body> </html> '
  1259.   call lineout tempfile
  1260. end
  1261.  
  1262. tt=sref_expire_response(0.05,dosdir(tempfile,'s'))
  1263. 'FILE ERASE TYPE text/html NAME' tempfile
  1264. return ' Done with Config2 -- submitted parameters '
  1265.  
  1266.  
  1267.  
  1268.  
  1269.  
  1270. /****************************************************/
  1271. /*  JUMP HERE ON POST CALLS, which are always "write info" calls */
  1272. /* you should never need to modify this */
  1273.  
  1274. write_It:   nop
  1275. crlf = '0d0a'x
  1276.  
  1277. ooks=fd.1
  1278. do pp=2 to fd.0
  1279.    ooks=ooks||' '||fd.pp
  1280. end
  1281.  
  1282.  call lineout tempfile, '<!doctype html public "-//IETF//DTD HTML 3.0//EN">'
  1283.         call lineout tempfile, "<html><head><title>FILTINST Results </title>"
  1284.         call lineout tempfile, '</head><body bgcolor="#'||usecolor||'">'
  1285.  
  1286.         call lineout tempfile,' <h1> SRE-FILTER Configurator </h1> '
  1287.  
  1288. foo=stream(afile,'c','query exists')
  1289. if foo="" then do
  1290.    call lineout tempfile,' Warning: Old INITFILT.'aport ' did not exist '
  1291. end
  1292. else do
  1293.  acf1='INITFILT.B'
  1294.   do hi=1 to 99
  1295.      try1=acf1||hi
  1296.      if stream(acf1||hi,'c','query exists')='' then leave
  1297.   end /* do */
  1298.  
  1299.   foo=dosrename(aFILE,try1)
  1300.    CALL LINEOUT TEMPFILE,'The old version of ' Afile ' has been saved as ' try1
  1301. end
  1302.  
  1303. /* Parse the argument list.  Extract current file (in LINES.n) variables
  1304. to the FILELINES. array.
  1305.  Check for arguments.  Note that if no arguments, error. */
  1306. param.0=0 ; fparam.0=0
  1307. do until list=""
  1308.     parse var list a0  '&' list
  1309.     parse var  a0 a1 '=' a2 
  1310.     a1=packur(a1) ; a2=strip(packur(a2))
  1311.     a1=upper(strip(a1))
  1312.     select
  1313.        when abbrev(a1,'LINES.')=1 then do
  1314.            parse var a1 foo '.' ith
  1315.           a2=translate(a2,' ','+')
  1316.           filelines.ith=packur(a2)
  1317.         end  /* Do */
  1318.         when abbrev(a1,'NICKNAME')=1 then do
  1319.              nickname=a2
  1320.         end
  1321.         otherwise do
  1322.             a2=translate(a2,' ','+')
  1323.             if wordpos(a1,ooks)>0 then do
  1324.                fparam.0=fparam.0+1 ; IARF0=fPARAM.0
  1325.                fparam.iarf0=a2 ; fparam.iarf0.name=a1
  1326.             end  /* Do */
  1327.             else do
  1328.                param.0=param.0+1 ; IARF=PARAM.0
  1329.                param.IARF=a2 ; PARAM.IARF.NAME=A1
  1330.             end
  1331.         end
  1332.      end
  1333. end
  1334.  
  1335.  
  1336. POOP=afile
  1337. call lineout poop,'; Last modified on : ' time() ' ' Date()
  1338. do mm=1 to filelines.0
  1339.    aa=sref_replacestrg(filelines.mm,'<','<','ALL')
  1340.    aa=sref_replacestrg(aa,'>','>','ALL')
  1341.    if aa=' ' then iterate
  1342.    if abbrev(aa,'; Last modified on')=1 then iterate
  1343.    call lineout POOP,packur(aa)
  1344. end /* do */
  1345.  
  1346. do mm=1 to fparam.0
  1347.   yow=fPARAM.MM.NAME "= '"fPARAM.MM "'"
  1348.   yow=translate(yow,' ','000d0a1a'x)
  1349.   call lineout POOP,yow
  1350. end
  1351.  
  1352. do mm=1 to param.0
  1353.    gosh1=param.mm ;   name1=param.mm.name ; inthis=0
  1354.    if pos('.',name1)>0 then do          /* is a stem var */
  1355.        do until gosh1=""
  1356.           parse var gosh1 al1 (crlf) gosh1
  1357.           al1=packur(translate(al1,' ','0d0a00'x))
  1358.           if al1=' ' then iterate
  1359.           inthis=inthis+1
  1360.           if nickname=' ' | abbrev(upper(name1),'HOSTS')=1 then do
  1361.               yow=name1||inthis " =  '" al1 "'  "
  1362.           end
  1363.           else do
  1364.               yow=name1||inthis||'.'||nickname " =  '" al1 "'  "
  1365.           end
  1366.           yow=translate(yow,' ','000d0a1a'x)
  1367.           call lineout poop, yow
  1368.        end /* do */
  1369.    end  /* Do */
  1370.    else do
  1371.       param.mm=packur(param.mm)
  1372.       if nickname=' '  then do
  1373.           yow=PARAM.MM.NAME "= '"PARAM.MM "'"
  1374.       end
  1375.       else do
  1376.           yow=PARAM.MM.NAME||'.'||nickname|| "= '"PARAM.MM "'"
  1377.       end
  1378.       yow=translate(yow,' ','000d0a1a'x)
  1379.       call lineout poop,yow
  1380.    end
  1381. end /* do */
  1382.  
  1383. CALL LINEOUT POOP
  1384. call lineout tempfile,' <p> ' afile  ' succesfully created.'
  1385.  
  1386. call lineout tempfile,' <hr> </body> </html> '
  1387. call lineout tempfile
  1388. foo=value('SREF_REDO',1,'os2environment')
  1389.  
  1390. tt=sref_expire_response(0.05,dosdir(tempfile,'s'))
  1391. 'FILE ERASE TYPE text/html NAME' tempfile
  1392. return 'Done with FILTINST -- saved parameters'
  1393.  
  1394.  
  1395.  
  1396. /********************************************/
  1397. /* --- create a row of radio buttons */
  1398. do_radio: procedure expose param. filelines. v. tempfile nickname quiklist. 
  1399. parse arg ith,inlist,nonick
  1400. unickname=nickname
  1401. if nonick=1 then unickname=' '
  1402. got1=0 ; 
  1403. domark=1   /* domark=0 prevents marking for comments -- use on 2nd pass */
  1404.  
  1405.  
  1406. foobax:
  1407. do jj=1 to inlist
  1408.    v2.jj=' '
  1409. end
  1410. findit=strip(param.ith)
  1411.  
  1412.  
  1413. if symbol('quiklist.findit')<>'VAR' then   do        /* no candiate entries */
  1414.    call lineout tempfile,' <INPUT TYPE=RADIO NAME="'||param.ith||'" '
  1415.    call lineout tempfile,' VALUE="'   ||v.mm||  '" '  ||v2.mm||  '>'   v.mm  '      , '
  1416.    return ' '
  1417. end
  1418.  
  1419. /* look at candidates only */
  1420. candlist=quiklist.findit
  1421. do mm0=1 to words(candlist)
  1422.     mm=strip(word(candlist,mm0))
  1423.     if mm=' ' then iterate
  1424.     bval=strip(upper(filelines.mm.name))
  1425.  
  1426.     if bval<>findit then iterate
  1427.  
  1428. /* check nickname stuff */
  1429.      if unickname<>' '   then do  /* check for .nickname at end of name */
  1430.         if pos(unickname,filelines.mm.stem)=0 then iterate
  1431.      end  /* Do */
  1432.      if unickname=' ' & filelines.mm.stem<>' ' & nonick<>1 then do /* check for nickname */
  1433.         foo1=lastpos('.',filelines.mm.stem)
  1434.         if datatype(substr(filelines.mm.stem,foo1+1))<>'NUM' then iterate
  1435.      end  /* Do */
  1436.  
  1437.     if domark=1 then FILELINES.MM.IGOT=1
  1438.     got1=1
  1439.     do mm2=1 to inlist
  1440.        cval=strip(filelines.mm.value)
  1441.       if v.mm2=cval then 
  1442.           v2.mm2="CHECKED"
  1443.       else
  1444.           v2.mm2=' '
  1445.     end
  1446. end             /* always use last match, if more then one */
  1447.  
  1448.  
  1449. if got1=0 then  do
  1450.       if unickname=' ' | nonick>0 then 
  1451.           nop
  1452.       else do
  1453.          unickname=' ' ; domark=0
  1454.          signal foobax            /* try looking for non host specific value */
  1455.       end
  1456.  end
  1457.  
  1458.  
  1459. do mm=1 to inlist
  1460.    call lineout tempfile,' <INPUT TYPE=RADIO NAME="'||param.ith||'" '
  1461.    call lineout tempfile,' VALUE="'   ||v.mm||  '" '  ||v2.mm||  '>'   v.mm  '      , '
  1462. end
  1463. return isit
  1464.  
  1465.  
  1466.  
  1467. /***********************************/
  1468. /* write out values for a variable (or a stem variable )
  1469. isfile=1 use file list
  1470. isfile=2 don't use hostnickname
  1471.  */
  1472. write_1:procedure expose param. filelines. tempfile fd. nickname quiklist. 
  1473. parse arg iat,isfile
  1474.  
  1475. unickname=strip(nickname)
  1476. if isfile>0 then unickname=' '
  1477.  
  1478. isstem=0 ;dostem=0
  1479. if isfile<>1 then do
  1480.   findit=param.iat
  1481.   dostem=param.iat.stem
  1482. end
  1483. else do
  1484.   findit=fd.iat
  1485. end
  1486.  
  1487. towrite=0                 /* search filelines for findit */
  1488. if symbol('quiklist.findit')<>'VAR' then    do       /* no candiate entries */
  1489.    call lineout tempfile, "  <li> <b>" findit  "</b> =<tt> n.a. </tt> <br>"
  1490.    return ' '
  1491. end
  1492.  
  1493.  
  1494.  
  1495. /* look at candidates only */
  1496. candlist=quiklist.findit
  1497. do mm0=1 to words(candlist)
  1498.     mm=strip(word(candlist,mm0))
  1499.  
  1500.     if mm=' ' then iterate
  1501.     if unickname<>' ' & filelines.mm.stem=' ' then iterate
  1502.    if filelines.mm.name=findit then do
  1503.       if unickname<>' ' & pos(unickname,filelines.mm.stem)=0 then iterate
  1504.       if unickname=' ' & filelines.mm.stem<>' '  then do /* check for unickname */
  1505.         foo1=lastpos('.',filelines.mm.stem)
  1506.         if datatype(substr(filelines.mm.stem,foo1+1))<>'NUM' then iterate
  1507.       end  /* Do */
  1508.  
  1509.       wow1=filelines.mm.value
  1510.       filelines.mm.igot=1
  1511.       if dostem=0 then do
  1512.            towrite=1
  1513.            dowrite=" <li> <b>" ||findit ||"</b> =<tt> "|| wow1 ||'</tt> <br>'
  1514.            iterate              /* get latter ones? */
  1515.       end
  1516.       astem=filelines.mm.stem
  1517.       if unickname=' ' & pos('.',astem)>0 then iterate
  1518.       poop='.'||unickname
  1519.       if unickname<>' ' then astem=sref_replacestrg(astem,poop,'')
  1520.       if unickname<>' ' then astem=sref_replacestrg(astem,unickname||'.','')
  1521.       towrite=towrite+1
  1522.       dowrite.towrite="  <li> <b>"|| findit ||'.' ||astem ||"</b> =<tt> " ||wow1|| '</tt> <br>'
  1523.       isstem=1+isstem
  1524.    end
  1525. end 
  1526.  
  1527. select 
  1528.    when towrite=0 then
  1529.       call lineout tempfile, "  <li> <b>" findit  "</b> =<tt> n.a. </tt> <br>"
  1530.    when dostem=0 then
  1531.        call lineout tempfile,dowrite
  1532.    otherwise do
  1533.         do mm=1 to towrite
  1534.            call lineout tempfile,dowrite.mm
  1535.         end
  1536.    end
  1537. end
  1538. return ' '
  1539.  
  1540.  
  1541.  
  1542.  
  1543.  
  1544. /* ----------- */                                                        
  1545. /* get environment value, possibly host specific */                      
  1546. /* ------------ */                                                       
  1547. get_value: procedure expose enmadd host_nickname 
  1548. parse arg vname,hname0
  1549. if hname0=0 then 
  1550.         hname=' '
  1551. else                                                    
  1552.     hname=strip(host_nickname)                          
  1553.  
  1554. vname=strip(vname) ;
  1555. if hname<>' ' then do                                                    
  1556.    aval=value(enmadd||vname||'.'||hname,,'os2environment')               
  1557.    if aval<>' ' Then                                                     
  1558.         return aval                                                      
  1559. end                                                                      
  1560. aval=value(enmadd||vname,,'os2environment')                              
  1561. return aval                   
  1562.  
  1563.  
  1564. /* **************************************
  1565.  get current value of a parameter.  If stem variable, return
  1566. in sorted order 
  1567. nonick=' ' -- check for nickname
  1568. 1= never check nickname
  1569. 2= only check for nickname
  1570. */
  1571.  
  1572. find_val:procedure expose param. filelines. nickname quiklist. 
  1573.  
  1574.  parse arg ith,nonick
  1575.  unickname=nickname
  1576.  if nonick=1 then unickname=' '
  1577.   findit=param.ith
  1578.   isstem=param.ith.stem
  1579.   domark=1   /* domark=0 prevents marking for comments -- use on 2nd pass */
  1580.  
  1581. if symbol('quiklist.findit')<>'VAR' then do          /* no candiate entries */
  1582.    return ' '
  1583. end
  1584.  
  1585.   
  1586. bowser:
  1587.  
  1588.   gots=0
  1589.   dowrite=0
  1590.  
  1591. /* look at candidates only */
  1592. candlist=quiklist.findit
  1593. do mm0=1 to words(candlist)
  1594.     mm=strip(word(candlist,mm0))
  1595.     if mm=' ' then iterate
  1596.  
  1597.      aval=filelines.mm.name
  1598.      if aval<>findit then iterate
  1599.      if unickname<>' ' then do  /* check for unickname at end of name */
  1600.         if pos(unickname,filelines.mm.stem)=0 then iterate
  1601.      end  /* Do */
  1602.      if unickname=' ' & filelines.mm.stem<>' '  then do /* check for unickname */
  1603.         foo1=lastpos('.',filelines.mm.stem)
  1604.         if datatype(substr(filelines.mm.stem,foo1+1))<>'NUM' then iterate
  1605.      end  /* Do */
  1606.      if domark=1 then FILELINES.MM.IGOT=1
  1607.      gogo=translate(filelines.mm.value, ' ','00090a0d'x) 
  1608.      if isstem=0 then do
  1609.         dowrite=1
  1610.         towrite=gogo
  1611.       end
  1612.       else do
  1613.           dowrite=1
  1614.           if filelines.mm.stem=' ' then iterate /* bad entry */
  1615.           fii=translate(filelines.mm.stem,' ','.') ; fii=strip(word(fii,1))
  1616.           if datatype(fii)<>'NUM' then iterate
  1617.           got.value.fii=gogo
  1618.           gots=max(gots,fii)
  1619.       end
  1620.    end          /* all lines in file */
  1621.  
  1622.    if dowrite=0 then  do
  1623.       if unickname=' ' | nonick>0 then return ' '
  1624.       unickname=' ' ; domark=0
  1625.       signal bowser             /* try looking for non host specific value */
  1626.    end
  1627.  
  1628.    if isstem=0 then return towrite
  1629.    eek=' '
  1630.    do jj=1 to gots
  1631.       if symbol('got.value.jj')<>'VAR' then iterate
  1632.       eek=eek||strip(got.value.jj)||'0d0a'x
  1633.    end /* do */
  1634.  
  1635. return strip(eek)
  1636.  
  1637.  
  1638.  
  1639. /* ***************** fill in file names */
  1640. find_fnames: procedure expose fd. filelines. 
  1641. do mm=1 to fd.0
  1642.    findit=strip(fd.mm)
  1643.    do mm2=1 to filelines.0
  1644.       aval=strip(filelines.mm2.name)
  1645.       if aval<>findit then iterate
  1646.       fd.mm.val=filelines.mm2.value
  1647.       FILELINES.MM2.IGOT=1
  1648.       leave
  1649.    end /* do */
  1650. end /* do */
  1651.  
  1652. return 0
  1653.  
  1654. /* --- variable names of convert foo.bar.1 to foo.1.bar */
  1655. fix_me:procedure  
  1656. parse arg a1
  1657.  
  1658. if a1=' '  then return a1
  1659. a1=strip(a1)
  1660. if abbrev(a1,';') then return a1
  1661.  
  1662. parse var a1  aname '=' avalue
  1663. if pos('.',aname)=0 then return a1
  1664.  
  1665. foo=translate(aname,' ','.')
  1666. if words(foo)<>3 then return a1
  1667.  
  1668. /* if here, array.x.y (3 elements) */
  1669. if datatype(word(foo,3))='NUM' & datatype(word(foo,2))<>'NUM' then do  /* rearrange */
  1670.    foo2=word(foo,1)||'.'||word(foo,3)||'.'||word(foo,2)||' = '||avalue
  1671.    return foo2
  1672. end  /* Do */
  1673. else do
  1674.    return a1
  1675. end  /* Do */
  1676.  
  1677.  
  1678.  
  1679.  
  1680.